<?php

namespace mbilling\BillingBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilder;

class OrdersSharedForm extends AbstractType
{
    protected $tarifs;

    public function __construct($tarifs)
    {
        $this->tarifs = $tarifs;
    }
    public function buildForm(FormBuilder $builder, array $options)
    {
        //$builder->add('hdd', 'text');
        $builder->add('domain', 'text', array('required' => false));
        //$builder->add('comment', 'textarea', array('required' => false));
        //$builder->add('cron_access', 'checkbox', array('required' => false));
        //$builder->add('ftp_access', 'checkbox', array('required' => false));
        //$builder->add('dns_access', 'checkbox', array('required' => false));
        //$builder->add('email_access', 'checkbox', array('required' => false));
        //$builder->add('mysql_access', 'checkbox', array('required' => false));
        //$builder->add('backup_access', 'checkbox', array('required' => false));
        //$builder->add('is_changed', 'checkbox', array('required' => false));
        //$builder->add('order_id', 'text');
        $builder->add('shared_tarif', 'choice', array('choices' => $this->tarifs, 'expanded' => true));
        //$builder->add('tarif', 'radio');
        //$builder->add('status', 'choice', array('choices' => array(1 => 'новый', 2 => 'перенос')));
        $builder->add('terms', 'checkbox');
        $builder->add('promocode', 'text', array('required' => false));
    }
}